'''
Author: error: git config user.name && git config user.email & please set dead value or install git
Date: 2022-11-11 07:47:50
LastEditors: error: git config user.name && git config user.email & please set dead value or install git
LastEditTime: 2022-11-11 08:08:47
FilePath: \新建文件夹 (2)\插入排序.py
Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
'''
a=[7,1,3,2,6,54,4,4,5,8,12,34]
for i in range(0,len(a)-1):
    temp=a[i+1]
    j=i+1
    while j>=0 and temp<a[j-1]:
        j=j-1
        print(j)
    if j>=-1:
        k=i+1
        while k>=j:
            a[k]=a[k-1]
            k=k-1
            print(a)
        a[j]=temp
print(a)        

